chore: fix copy-paste mistakes#13281
Merged
kgryte merged 2 commits intoJul 5, 2026
Merged
Conversation
…ime/mode` The README's equation `label`, `data-equation`, and image `alt` attributes were copy-pasted from the `mean` sibling and never renamed, describing the mode as an expected value while the rendered LaTeX and SVG correctly show the mode piecewise formula. Ten of eleven sibling packages in the namespace name the equation after the package's own function; align `mode` with that pattern by replacing `eq:betaprime_expectation` with `eq:betaprime_mode` and updating both `alt` attributes to "Mode for a beta prime distribution.". The SVG filename and pinned CDN URL are left alone so the image reference continues to resolve at the historical commit.
…ts/betaprime/variance` The type test file was byte-identical to the `stdev` sibling: `./index` was aliased as `stdev` and every `$ExpectType`/`$ExpectError` call site used that name. Ten of eleven sibling packages bind `./index` to their own function name in `docs/types/test.ts`; rename the alias and its call sites to `variance` so the type test reads as belonging to this package. The imported module is unchanged, so dtslint assertions still exercise the same declarations.
Contributor
Coverage Report
The above coverage report was generated for the changes in this PR. |
kgryte
approved these changes
Jul 5, 2026
stats/base/dists/betaprime
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Corrects copy-paste-derived identifiers in two
@stdlib/stats/base/dists/betaprimesibling packages surfaced by a cross-package majority-vote audit of the namespace's twelve members. Both fixes are docs-only, mechanical renames; no observable behavior changes and no test expectations move.Namespace summary: 12 members audited (
cdf,ctor,kurtosis,logcdf,logpdf,mean,mode,pdf,quantile,skewness,stdev,variance). Structural pass (file tree,package.json,manifest.json, README section shape, keywords, benchmarks/tests/examples layout) and semantic pass (public signatures, validation prologues, error construction, JSDoc, dependencies) yielded high uniformity within the C-implementation and no-C sub-groups. Two features had a ≥75% majority with a single-package outlier and a mechanical fix; other candidate drifts (e.g. explicitisnanon shape parameters in moment functions,Notessection presence in READMEs, package.jsongypfilepresence) fell below threshold or tracked with legitimate structural differences and were dropped.@stdlib/stats/base/dists/betaprime/modeRename the equation
label,data-equation, andaltidentifiers fromeq:betaprime_expectation/ "Expected value for a beta prime distribution." toeq:betaprime_mode/ "Mode for a beta prime distribution." — leftovers copy-pasted frommean/README.md. Rendered SVG and raw LaTeX are unchanged; this only aligns the identifiers with the sibling packages, ten of eleven of which already name the label after their own function.@stdlib/stats/base/dists/betaprime/varianceRename the local binding in
docs/types/test.tsfromstdevtovarianceat the import and all twenty call sites; the file was a byte-identical copy of the siblingstdevpackage's test with the alias never renamed. Behavior is unchanged — the import still resolves./indexto variance's declaration and dtslint asserts the same surface — but the fixture now matches the package under test and aligns with the convention used in ten of the eleven siblingbetaprimedistribution packages.Related Issues
None.
Questions
No.
Other
Validation. Structural features were extracted for every member; semantic features (public signature, validation prologue, error construction, JSDoc shape, dependencies) were extracted via a per-package pass over
lib/main.jsand adjacent sources. Both surviving corrections were then independently reviewed for (a) whether the deviation might reflect a legitimate semantic difference between the outlier and its siblings and (b) whether tests or examples rely on the deviating identifier — both came back confirmed as unintentional copy-paste artifacts with no downstream dependence. Deliberately excluded: outlier structural features that track with C-implementation status (e.g.gypfile,manifest.json,docs/img/,src/,include.gypi), features without a clear namespace-wide majority (READMENotessection, moment-functionisnanprologues), and the misnamedmode/docs/img/equation_betaprime_expectation.svgfile itself (rename would break the CDN URL pinned to a historical commit hash; the metadata correction here is safe and self-contained).The pinned CDN URL in
mode/README.mdis intentionally left unchanged: it references the current filename at a historical stdlib commit and continues to resolve to the correctly-rendered mode SVG. A future filename rename can be paired with a coordinated CDN commit-hash bump.Checklist
AI Assistance
If you answered "yes" above, how did you use AI assistance?
Disclosure
This PR was written primarily by Claude Code as part of a scheduled cross-package drift-detection routine. The namespace was picked uniformly at random; drift was surfaced by a majority-vote analysis of structural and semantic features across the twelve
betaprimesibling packages; only mechanical fixes with a clear ≥75%-conformance majority and no behavior impact were retained. Independent verification passes confirmed both fixes as unintentional copy-paste from the neighboring sibling.@stdlib-js/reviewers
Generated by Claude Code